home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
misc
/
prnf246.zip
/
PRNSERT.DOC
< prev
next >
Wrap
Text File
|
1994-04-05
|
6KB
|
117 lines
_______PrnSert Ver. 1.00
Purpose: PrnSert reads a file & inserts printer instructions from a PrnSet
data file wherever it finds a PrnSet-style printer instruction.
It sends the result to a file or to the printer. The instructions
must be the same kind PrnSet would accept at the command line, but
preceded with a downslash: "\"
Format: PRNSERT readfile [outfile] [/D datafile] [/B] [/Nn]
________ readfile is the file to be read and printed. You can use a full
drive:\path spec, but no wildcards.
_______ outfile is the file or printer to which the output should go
(outfile defaults to prn)
___________ __________ /D datafile (OR /Ddatafile) specifies the file of PrnSet-style
printer data to) be used. (If no extension is given, it
supplies ".DAT". If no /D datfile is given at all, it
defaults to PRNSET.DAT)
__ /B means "Batch" - runs without stopping to ask. For use when
running from a BAT file.
___ /Nn (where n is a number) means print n copies. (Default is 1)
Remarks: PrnSert is a supplement to and parasitic on PrnSet, the universal
printer setter. PrnSet sets the printer to print in a specified
style before you start it printing a file, but once the printing
starts the print style can't be changed. PrnSert will read and
print a file, interpreting PrnSet's kind of printer instruction as
it goes. This allows you to put print instructions into the file
itself to change the style on the fly, while printing.
The instructions you must use are the kind PrnSet accepts from the
command line (See PrnSet DOC, Section 3.2 on "The Command Line
Mode"), but PrnSert is a little more restrictive. The rules go
like this. Each command consists of the following (without spaces
between them):
1. downslash ("\")
2. either "+" to turn the mode ON or "-" to turn it OFF.
3. the first two characters of the name.
If the command takes numbers (like margin setting or line
spacing), add the following:
4. upslash ("/")
5. up to 3 decimal numbers or 2 hex numbers followed by "H".
If you're not sure exactly what the exact names of your printer
instructions are, you can print out the DAT file you're using.
Better still, print out a PRNSET.LST file for that data. Run
PrnSet with that data file. Press F3 to get to the configuration
_______PrnSert 1.00 Page 2
screen, and press F10 there to make a PRNSET.LST file. Among
other things, it will show the two-character key for each command
in the file and whether the command takes a number.
Examples: Here are some examples, using instructions from LQ-800.DAT:
PrnSet Command PrnSert What it
Line Version Version does
+ELITE \+EL Turn on elite type
+Condensed \+co Turn on condensed type
+LMargin/8 \+LM/8 Set 8-column left margin
+180/24 \+18/24 Set 24/180th inch line spacing
-Cond \-CO Turn off condensed type
Notes:
Talking to PrnSet on the command line, you can use the first
two characters of instruction name and as much of the rest of
it as you like (e.g.: "LMargin", "LMarg" or "LM"). Talking to
PrnSert in the text it's to print, you must use just the first
two characters.
Upper & lower case doesn't matter.
Printing a plain downslash would go wrong if the next charac-
ters happen to form a print instruction. To make sure, to
print a downslash, double it. "\\" will print as "\", and it
won't turn the next few characters into a printer instruction.
If you have an appropriate PRNSET.DAT and run PrnSert on this
file, you'll see what the instructions above do. Then double
the downslashes and do it again. (But, be sure to reset the
printer, first!)
What instruction symbols are allowed and what they mean is deter-
mined by the .DAT file used. You can edit your regular PRNSET.DAT
file with PrnSert in mind, and there's no reason you shouldn't
make a special .DAT file for use with PrnSert only.
History: PrnSert grew out of a simple label printer which had a set of sym-
bols to with their corresponding printer instructions hard-coded.
Whenever I got a new printer, I rewrote the program. It occurred
to me that PrnSet's .DAT files already contained printer symbols
and instructions and I already had the routines for interpreting
them. Reused, they form the basis of PrnSert.
PrnSert could have been added as another function in PrnSet, but I
thought PrnSet already a mite over-featured, and a simple command
line interface would do the job better.
R. N. Wisan, April 1994
37 Clinton St., Oneonta, NY 13820
internet: WISANR.hartwick.edu